'use strict';

var loadLazyjs = function (js) {
    return {
        loadMyDirectives: function ($ocLazyLoad) {
            return $ocLazyLoad.load({
                name: 'stareal',
                files: js
            })
        }
    }
};
stareal.config(['$stateProvider', '$urlRouterProvider', '$locationProvider', '$ocLazyLoadProvider', function ($stateProvider, $urlRouterProvider, $locationProvider, $ocLazyLoadProvider) {
    // $locationProvider.html5Mode(true);
    // $locationProvider.hashPrefix('?');
    $ocLazyLoadProvider.config({
        debug: false,
        events: true,
    });
    $urlRouterProvider.otherwise('/main/index');
    $stateProvider
        .state('main', {
            url: '/main',
            template: '<div ui-view ></div>'
        })
        .state('main.index', {
            url: '/index',
            templateUrl: 'static/partials/main/index.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/index.js',
                'static/js/controllers/public/public.js',
                'static/js/controllers/public/sign.js',
                'static/css/public.css',
                'static/css/main.css',
                'static/css/news/index.css'
            ])
        })
            //h5 渠道入口
        .state('main.index0', {
            url: '/index/:cordeId',
            templateUrl: 'static/partials/main/index.html',
            resolve: loadLazyjs([
                'https://pv.sohu.com/cityjson?ie=utf-8',
                'static/js/controllers/main/index.js',
                'static/js/controllers/public/public.js',
                'static/js/controllers/public/sign.js',
                'static/css/public.css',
                'static/css/main.css',
                'static/css/news/index.css'
            ])
        })
            //兑吧
        .state('main.activeDui', {
            url: '/activeDui/:id/:thumb/:title/:app',
            templateUrl: 'static/partials/main/active_dui.html',
            resolve: loadLazyjs([
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/active_dui.js',
                'static/css/public.css',
                'static/css/pm/CategoryList.css',
                'static/css/pm/view.css',
                'static/css/selectla.css',
                'static/css/price/price_comparisonlist.css',
                'static/css/venus/venus.css',
            ])
        })
        //下载页面
        .state('main.corde', {
            url: '/corde',
            templateUrl: 'static/partials/main/corde.html',
            resolve: loadLazyjs([
            ])
        })
            //渠道页面
        .state('main.cordeIos', {
            url: '/cordeIos/:corderId',
            templateUrl: 'static/partials/main/corde_ios.html',
            resolve: loadLazyjs([
                'https://pv.sohu.com/cityjson?ie=utf-8',
                'static/js/controllers/main/corde_ios.js',
                'static/js/controllers/public/public.js',
            ])
        })
        //精彩视频-列表
        .state('main.videolist', {
            url: '/videolist',
            templateUrl: 'static/partials/main/videolist.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/videolist.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/list.css',
                'static/css/special.css',
                'static/css/video/videoplayer.css',
                'static/css/video/video.css'
            ])
        })
        //新闻资讯列表
        .state('main.newslist', {
            url: '/newslist',
            templateUrl: 'static/partials/main/news_lists.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/news_lists.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/list.css',
                'static/css/special.css',
                'static/css/news/index.css'
            ])
        })
        //美图列表
        .state('main.beautifulImg', {
            url: '/beautifulImg',
            templateUrl: 'static/partials/main/beautiful_img.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/beautiful_img.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/BeautifulImgs/index.css',
            ])
        })
        //美图详情
        .state('main.beautifulImgDetail', {
            url: '/beautifulImgDetail/:id/:app',
            templateUrl: 'static/partials/main/beautiful_imgDetail.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/beautiful_imgDetail.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/BeautifulImgs/index.css',
            ])
        })
        //美图详情  兼容老版分享
        .state('main.beautifulImgDetail0', {
            url: '/beautifulImgDetail/:id',
            templateUrl: 'static/partials/main/beautiful_imgDetail.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/beautiful_imgDetail.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/BeautifulImgs/index.css',
            ])
        })
        //独家攻略
        .state('main.mydeerRaiders', {
            url: '/mydeerRaiders/:kind',
            templateUrl: 'static/partials/main/mydeer_raiders.html',
            resolve: loadLazyjs([
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/mydeer_raiders.js',
                'static/css/public.css',
                'static/css/pm/pm_list.css',
                'static/css/pm/view.css',
                'static/css/price/price_comparisonlist.css',
            ])
        })
        //独家攻略详情
        .state('main.raidersdetail', {
            url: '/raidersdetail/id/:id/:app',
            templateUrl: 'static/partials/main/Raiders_detail.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/Raiders_detail.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/pm/article.css',
            ])
        })
        //独家攻略详情 兼容 老版分享
        .state('main.raidersdetail0', {
            url: '/raidersdetail/id/:id',
            templateUrl: 'static/partials/main/Raiders_detail.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/Raiders_detail.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/pm/article.css',
            ])
        })
        //视频详情
        .state('main.videodetail', {
            url: '/videodetail/id/:id/:app',
            templateUrl: 'static/partials/main/video_detail.html',
            resolve: loadLazyjs([
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/video_detail.js',
                'static/css/public.css',
                'static/css/pm/article.css',
                'static/css/video/videoplayer.css',
                'static/css/video/video.css'
            ])
        })
        //视频详情 兼容 老版分享
        .state('main.videodetail0', {
            url: '/videodetail/id/:id',
            templateUrl: 'static/partials/main/video_detail.html',
            resolve: loadLazyjs([
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/video_detail.js',
                'static/css/public.css',
                'static/css/pm/article.css',
                'static/css/video/videoplayer.css',
                'static/css/video/video.css'
            ])
        })
        //他人中心-观演
        .state('main.viewpersonal', {
            url: '/viewpersonal/:user_id/:kind',
            templateUrl: 'static/partials/main/view_personal.html',
            resolve: loadLazyjs([
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/view_personal.js',
                'static/css/authorpublish.css',
                'static/css/public.css',
                'static/css/pm/article.css',
            ])
        })
        //专题
        .state('main.new', {
            url: '/new',
            templateUrl: 'static/partials/main/new.html',
            resolve: loadLazyjs([
                'static/css/new.css',
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/new.js'
            ])
        })
        // 创建观演记
        .state('main.createview', {
            url: '/createview',
            templateUrl: 'static/partials/main/createview.html',
            resolve: loadLazyjs([
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/createview.js',
                'static/css/public.css',
                'static/css/my/view.css'
            ])
        })
        //新编辑
        .state('main.viewwangeditor', {
            url: '/viewwangeditor/:id/:viewshowname', //id  观演  viewshowname   关联演出名
            templateUrl: 'static/partials/main/new_viewedit.html',
            resolve: loadLazyjs([
                // 'static/dist/js/wangEditor-mobile.js',
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/new_viewedit.js',
                'static/css/public.css',
                'https://cdn.bootcss.com/font-awesome/3.0.2/css/font-awesome.min.css',
                'static/css/upload_editor.css'
            ])
        })
        // 观演记发表页面
        .state('main.sendView', {
            url: '/sendView/:id',
            templateUrl: 'static/partials/main/sendView.html',
            resolve: loadLazyjs([
                'static/css/public.css',
                'static/css/crop/cropper.min.css',
                'static/css/crop/ImgCropping.css',
                'static/css/my.css',
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/sendView.js'
            ])
        })
        //衍生品
        .state('main.product', {
            url: '/product/:kind/:sort/:direct/:keyword',
            templateUrl: 'static/partials/main/product.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/product.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/product.css',
                'static/css/special.css'
            ])
        })
        .state('main.list', {
            url: '/list/:kind/:sort/:direct/:keyword',
            templateUrl: 'static/partials/main/list.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/list.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/list.css',
                'static/css/special.css'
            ])
        })
        //历史日签
        .state('main.historySign', {
            url: '/historySign',
            templateUrl: 'static/partials/main/history_sign.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/history_sign.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/sign/history_sign.css'
            ])
        })
        //历史日签
        .state('main.historyBigSign', {
            url: '/historyBigSign/:indexId',
            templateUrl: 'static/partials/main/history_bigsign.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/history_bigsign.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/sign/history_sign.css'
            ])
        })
        //衍生品详情
        .state('main.productdetail', {
            url: '/productDetail/product/:good_id',
            templateUrl: 'static/partials/main/productDetail.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/product_detail.js',
                'static/css/public.css',
                'static/css/product/detail.css',
            ])
        })
        //衍生品购物车
        .state('main.productcar', {
            url: '/productcar',
            templateUrl: 'static/partials/main/productCar.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/product_car.js',
                'static/css/public.css',
                'static/css/product/detail.css',
                'static/css/product/car.css'
            ])
        })
        //衍生品购物车--确认订单
        .state('main.productpay', {
            url: '/productpay',
            templateUrl: 'static/partials/main/productPay.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/product_pay.js',
                'static/css/public.css',
                'static/css/product/detail.css',
                'static/css/product/pay.css'
            ])
        })
        //衍生品立即购买
        .state('main.productspay', {
            url: '/productspay/:order_id?_',
            templateUrl: 'static/partials/main/productSpay.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/product_spay.js',
                'static/css/public.css',
                'static/css/product/detail.css',
                'static/css/product/pay.css'
            ])
        })
        //首页搜索
        .state('main.indexsearch', {
            url: '/indexsearch',
            templateUrl: 'static/partials/main/indexsearch.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/indexsearch.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/main.css',
                'static/css/pm/CategoryList.css',
                'static/css/pm/view.css',
                'static/css/price/price_comparisonlist.css',
            ])
        })

        //观演 搜索
        .state('main.viewsearch', {
            url: '/viewsearch',
            templateUrl: 'static/partials/main/viewsearch.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/viewsearch.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/main.css',
                'static/css/pm/CategoryList.css',
                'static/css/pm/view.css'
            ])
        })
        //观演 搜索
        .state('main.raidersearch', {
            url: '/raidersearch',
            templateUrl: 'static/partials/main/raidersearch.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/raidersearch.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/main.css',
                'static/css/pm/CategoryList.css',
                'static/css/pm/view.css'
            ])
        })
        //观演 搜索
        .state('main.venussearch', {
            url: '/venussearch',
            templateUrl: 'static/partials/main/venussearch.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/venussearch.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/main.css',
                'static/css/pm/CategoryList.css',
                'static/css/price/price_comparisonlist.css',
                'static/css/venus/venus.css',
            ])
        })
        //比价 搜索
        .state('main.pricesearch', {
            url: '/pricesearch',
            templateUrl: 'static/partials/main/pricesearch.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/pricesearch.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/main.css',
                'static/css/pm/CategoryList.css',
                'static/css/pm/view.css',
                'static/css/price/price_comparisonlist.css',
            ])
        })
        .state('main.detail',{
            url: '/detail/good/:good_id/:app',
            templateUrl: 'static/partials/main/detail.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/detail.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/detail.css',
            ])
        })
        //兼容老版分享
        .state('main.detail0',{
            url: '/detail/good/:good_id',
            templateUrl: 'static/partials/main/detail.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/detail.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/detail.css',
            ])
        })
        .state('main.gooddetail', {
            url: '/gooddetail/:id/:app',///:app',
            templateUrl: 'static/partials/main/gooddetail.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/gooddetail.js',
                'static/css/public.css'
            ])
        })
        //兼容老版分享
        .state('main.gooddetail0', {
            url: '/gooddetail/:id',///:app',
            templateUrl: 'static/partials/main/gooddetail.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/gooddetail.js',
                'static/css/public.css'
            ])
        })
        //新闻详情
        .state('main.newdetail', {
            url: '/newdetail/:newId/:app', ///:app',
            templateUrl: 'static/partials/main/new_detail.html',
            resolve: loadLazyjs([
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/new_detail.js',
                'static/css/public.css',
                'static/css/pm/article.css',
                'static/css/news.css',
            ])
        })
        //新闻详情 兼容老版分享
        .state('main.newdetail0', {
            url: '/newdetail/:newId', ///:app',
            templateUrl: 'static/partials/main/new_detail.html',
            resolve: loadLazyjs([
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/new_detail.js',
                'static/css/public.css',
                'static/css/pm/article.css',
                'static/css/news.css',
            ])
        })
        //城市选择
        .state('main.city', {
            url: '/city',
            templateUrl: 'static/partials/main/city.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/city.js',
                'static/css/public.css',
                'static/css/city.css'
            ])
        })
        //新闻详情 app展示
        .state('main.newappdetail', {
            url: '/newappdetail/:newId/:app',
            templateUrl: 'static/partials/main/new_appdetail.html',
            resolve: loadLazyjs([
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/new_detail.js',
                'static/css/public.css',
                'static/css/pm/article.css',
                'static/css/news.css',
            ])
        })  //新闻详情 app展示 兼容老版分享
        .state('main.newappdetail0', {
            url: '/newappdetail/:newId',
            templateUrl: 'static/partials/main/new_appdetail.html',
            resolve: loadLazyjs([
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/new_detail.js',
                'static/css/public.css',
                'static/css/pm/article.css',
                'static/css/news.css',
            ])
        })
        .state('main.newactivelist', {
            url: '/newactivelist/:kind/:activenavbar',
            templateUrl: 'static/partials/main/newActive_list.html',
            resolve: loadLazyjs([
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/newActive_list.js',
                'static/css/public.css',
                'static/css/pm/pm_list.css',
                'static/css/selectla.css',
                'static/css/activity/activity.css',
            ])
        })
        //活动 搜索
        .state('main.activeSearch', {
            url: '/activeSearch',
            templateUrl: 'static/partials/main/activeSearch.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/activeSearch.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/main.css',
                'static/css/selectla.css',
                'static/css/pm/CategoryList.css',
                'static/css/pm/view.css'
            ])
        })
        // //应援棒获取提示
        .state('main.activeinstructions', {
            url: '/activeinstructions/:app/:checked',
            templateUrl: 'static/partials/main/active_instructions.html',
            resolve: loadLazyjs([
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/active_instructions.js',
                'static/css/public.css',
                'static/css/pm/pm_list.css',
                'static/css/activity/activity.css',
            ])
        })
        // //应援棒获取提示 兼容老版
        .state('main.activeinstructions0', {
            url: '/activeinstructions/:app',
            templateUrl: 'static/partials/main/active_instructions0.html',
            resolve: loadLazyjs([
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/active_instructions.js',
                'static/css/public.css',
                'static/css/pm/pm_list.css',
                'static/css/activity/activity.css',
            ])
        })
        // //独角币说明
        .state('main.unicornInstructions', {
            url: '/unicornInstructions/:app',
            templateUrl: 'static/partials/main/Unicorn_instruction.html',
            resolve: loadLazyjs([
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/Unicorn_instruction.js',
                'static/css/public.css',
                'static/css/pm/pm_list.css',
                'static/css/activity/activity.css',
            ])
        })
        //活动详情
        .state('main.activedetail', {
            url: '/activedetail/:id/:app',
            templateUrl: 'static/partials/main/active_detail.html',
            resolve: loadLazyjs([
                'https://pv.sohu.com/cityjson?ie=utf-8',
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/active_detail.js',
                'static/css/public.css',
                'static/css/pm/pm_list.css',
                'static/css/pm/article.css',
                'static/css/activity/activity.css',
            ])
        })
        //活动详情  兼容老板分享
        .state('main.activedetail0', {
            url: '/activedetail/:id',
            templateUrl: 'static/partials/main/active_detail.html',
            resolve: loadLazyjs([
                'https://pv.sohu.com/cityjson?ie=utf-8',
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/active_detail.js',
                'static/css/public.css',
                'static/css/pm/pm_list.css',
                'static/css/pm/article.css',
                'static/css/activity/activity.css',
            ])
        })
        //活动中奖名单
        .state('main.activeaward', {
            url: '/activeaward/:id',
            templateUrl: 'static/partials/main/active_award.html',
            resolve: loadLazyjs([
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/active_award.js',
                'static/css/public.css',
                'static/css/pm/pm_list.css',
                'static/css/pm/article.css',
                'static/css/activity/activity.css',
            ])
        })
        //众筹详情
        .state('main.raiseactivedetail', {
            url: '/raiseactivedetail/:id/:app',
            templateUrl: 'static/partials/main/raiseactivity_detail.html',
            resolve: loadLazyjs([
                'https://pv.sohu.com/cityjson?ie=utf-8',
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/raiseactivity_detail.js',
                'static/css/public.css',
                'static/css/pm/pm_list.css',
                'static/css/pm/article.css',
                'static/css/activity/activity.css',
            ])
        })
        //众筹详情  兼容老板分享
        .state('main.raiseactivedetail0', {
            url: '/raiseactivedetail/:id',
            templateUrl: 'static/partials/main/raiseactivity_detail.html',
            resolve: loadLazyjs([
                'https://pv.sohu.com/cityjson?ie=utf-8',
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/raiseactivity_detail.js',
                'static/css/public.css',
                'static/css/pm/pm_list.css',
                'static/css/pm/article.css',
                'static/css/activity/activity.css',
            ])
        })
        //我的积分
        .state('main.integral', {
            url: '/integral/:app/:accessToken/:checked',
            templateUrl: 'static/partials/main/integral.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/integral.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/my.css',
                'static/css/my/integral.css'
            ])
        })
        //积分指南
        .state('main.integralGuide', {
            url: '/integralGuide/:app',
            templateUrl: 'static/partials/main/integral_guide.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/integral_guide.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/my.css',
                'static/css/my/integral.css'
            ])
        })
        //攻略
        .state('main.Raiders', {
            url: '/Raiders',
            templateUrl: 'static/partials/main/Raiders.html',
            resolve: loadLazyjs([
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/Raiders.js',
                'static/css/public.css',
                'static/css/pm/pm_list.css',
                'static/css/pm/view.css',
                'static/css/price/price_comparisonlist.css',
            ])
        })
        //观演记分类
        .state('main.Viewlist', {
            url: '/Viewlist',
            templateUrl: 'static/partials/main/view_list.html',
            resolve: loadLazyjs([
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/view_list.js',
                'static/css/public.css',
                'static/css/pm/pm_list.css',
                'static/css/pm/view.css'
            ])
        })
        //攻略- 比价
        .state('main.Pricecomparisonlist', {
            url: '/Pricecomparisonlist',
            templateUrl: 'static/partials/main/price_comparisonlist.html',
            resolve: loadLazyjs([
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/price_comparisonlist.js',
                'static/css/public.css',
                'static/css/price/price_comparisonlist.css',
            ])
        })
            //专题详情 演出
        .state('main.PerformanceTopics', {
            url: '/PerformanceTopics/:id/:app',
            templateUrl: 'static/partials/main/Performance_topics.html',
            resolve: loadLazyjs([
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/Performance_topics.js',
                'static/css/public.css',
                'static/css/price/price_comparisonlist.css',
                'static/css/perTopics.css'
            ])
        })
        //专题详情 活动
        .state('main.ActiveTopics', {
            url: '/ActiveTopics/:id/:app',
            templateUrl: 'static/partials/main/active_topics.html',
            resolve: loadLazyjs([
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/active_topics.js',
                'static/css/public.css',
                'static/css/price/price_comparisonlist.css',
                'static/css/perTopics.css'
            ])
        })
        //专题详情 观演记
        .state('main.viewsTopics', {
            url: '/viewsTopics/:id/:app',
            templateUrl: 'static/partials/main/views_topics.html',
            resolve: loadLazyjs([
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/views_topics.js',
                'static/css/public.css',
                'static/css/price/price_comparisonlist.css',
                'static/css/perTopics.css'
            ])
        })
        //专题详情 攻略
        .state('main.raidersTopics', {
            url: '/raidersTopics/:id/:app',
            templateUrl: 'static/partials/main/raiders_topics.html',
            resolve: loadLazyjs([
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/raiders_topics.js',
                'static/css/public.css',
                'static/css/price/price_comparisonlist.css',
                'static/css/perTopics.css'
            ])
        })
        //观演记分类列表-2
        .state('main.pm_CategoryList', {
            url: '/pm_CategoryList/:classId/:hos',
            templateUrl: 'static/partials/main/pm_CategoryList.html',
            resolve: loadLazyjs([
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/CategoryList.js',
                'static/css/public.css',
                'static/css/pm/CategoryList.css',
                'static/css/pm/view.css'
            ])
        })
        //比价分类列表-2
        .state('main.price_CategoryList', {
            url: '/price_CategoryList/:classId/:cityid/:hot/:score/:cityName',
            templateUrl: 'static/partials/main/price_CategoryList.html',
            resolve: loadLazyjs([
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/price_CategoryList.js',
                'static/css/public.css',
                'static/css/pm/CategoryList.css',
                'static/css/pm/view.css',
                'static/css/selectla.css',
                'static/css/price/price_comparisonlist.css',
            ])
        })
        //场馆
        .state('main.venus', {
            url: '/venus/:longitude/:cityid/:distance/:score/:cityName/:latitude',
            templateUrl: 'static/partials/main/venus.html',
            resolve: loadLazyjs([
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/venus.js',
                'static/css/public.css',
                'static/css/pm/CategoryList.css',
                'static/css/pm/view.css',
                'static/css/selectla.css',
                'static/css/price/price_comparisonlist.css',
                'static/css/venus/venus.css',
            ])
        })
        //场馆详情
        .state('main.venusdetail', {
            url: '/venusdetail/:id/:app',
            templateUrl: 'static/partials/main/venus_detail.html',
            resolve: loadLazyjs([
                'static/js/vendor/three.min.js',
                'static/js/vendor/orienter.js',
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/venus_detail.js',
                'static/css/public.css',
                'static/css/pm/CategoryList.css',
                'static/css/pm/view.css',
                'static/css/selectla.css',
                'static/css/price/price_comparisonlist.css',
                'static/css/venus/venus.css',
            ])
        })
        //场馆详情  兼容老板分享
        .state('main.venusdetail0', {
            url: '/venusdetail/:id',
            templateUrl: 'static/partials/main/venus_detail.html',
            resolve: loadLazyjs([
                'static/js/vendor/three.min.js',
                'static/js/vendor/orienter.js',
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/venus_detail.js',
                'static/css/public.css',
                'static/css/pm/CategoryList.css',
                'static/css/pm/view.css',
                'static/css/selectla.css',
                'static/css/price/price_comparisonlist.css',
                'static/css/venus/venus.css',
            ])
        })
        //场馆简介详情
        .state('main.venusInfodetail', {
            url: '/venusInfodetail/:id/:app',
            templateUrl: 'static/partials/main/venus_infodetail.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/venus_infodetail.js',
                'static/css/public.css'
            ])
        })
        //场馆简介详情   兼容老板分享
        .state('main.venusInfodetail0', {
            url: '/venusInfodetail/:id',
            templateUrl: 'static/partials/main/venus_infodetail.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/venus_infodetail.js',
                'static/css/public.css'
            ])
        })
        //免费索票
        .state('main.freeticket',{
            url: '/freeticket/:freeTicketId',
            templateUrl: 'static/partials/main/freeTicket.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/freeTicket.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/freeTicket.css'
            ])
        })
        //360全景
        .state('main.venus360', {
            url: '/venus360',
            templateUrl: 'static/partials/main/venus_360.html',
            resolve: loadLazyjs([
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/venus_360.js',
                'static/css/public.css',
                'static/css/pm/CategoryList.css',
                'static/css/pm/view.css',
                'static/css/selectla.css',
                'static/css/price/price_comparisonlist.css',
                'static/css/venus/venus.css',
            ])
        })
        //场馆
        .state('main.venusgao', {
            url: '/venusgao/:sectLog/:sectLat/:sectName/:id',
            templateUrl: 'static/partials/main/venus_gao.html',
            resolve: loadLazyjs([
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/venus_gao.js',
                'static/css/public.css',
                'static/css/pm/CategoryList.css',
                'static/css/pm/view.css',
                'static/css/selectla.css',
                'static/css/price/price_comparisonlist.css',
                'static/css/venus/venus.css',
            ])
        })
        // 观演记协议
        .state('main.viewAgreement', {
            url: '/viewAgreement',
            templateUrl: 'static/partials/main/viewAgreement.html',
            resolve: loadLazyjs([
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/viewAgreement.js',
                'static/css/public.css',
                'static/css/Agreement.css'

            ])
        })
        //独角秀服务协议
        .state('main.showAgreement', {
            url: '/showAgreement',
            templateUrl: 'static/partials/main/showAgreement.html',
            resolve: loadLazyjs([
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/viewAgreement.js',
                'static/css/public.css',
                'static/css/Agreement.css'
            ])
        })
        //独角秀隐私服务协议
        .state('main.privacyAgreement', {
            url: '/privacyAgreement',
            templateUrl: 'static/partials/main/privacyAgreement.html',
            resolve: loadLazyjs([
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/viewAgreement.js',
                'static/css/public.css',
                'static/css/Agreement.css'
            ])
        })
        //同城乐活
        .state('main.LeHuo', {
            url: '/LeHuo',
            templateUrl: 'static/partials/main/lehuo.html',
            resolve: loadLazyjs([
                'static/js/controllers/public/public.js',
                'static/js/controllers/main/lehuo.js',
                'static/css/public.css',
                'static/css/activity/activity.css',
                'static/css/LeHuo/lehuo.css'


            ])
        })
        //点评
        .state('main.Reviews', {
            url: '/Reviews',
            templateUrl: 'static/partials/main/Reviews.html',
            resolve: loadLazyjs([
                // 'static/js/controllers/main/revice.js',
                'static/js/controllers/public/public.js',
                // 'static/js/controllers/main/detail.js',
                'static/css/public.css',
                'static/css/pm/Reviews.css',
                'static/js/controllers/main/Reviews.js'
            ])
        })


        //签到
        .state('main.sign1', {
            url: '/sign1',
            templateUrl: 'static/partials/main/sign1.html',
            resolve: loadLazyjs([
                'static/js/controllers/public/public.js',
                // 'static/js/controllers/main/detail.js',
                'static/css/public.css',
                'static/css/pm/sign1.css',
                'static/js/controllers/main/sign1.js'
            ])
        })




        //观演记详情
        .state('main.viewdetail', {
            url: '/viewdetail/id/:id/:app',
            templateUrl: 'static/partials/main/view_detail.html',
            resolve: loadLazyjs([
                // 'static/js/controllers/main/revice.js',
                'static/js/controllers/public/public.js',
                // 'static/js/controllers/main/detail.js',
                'static/css/public.css',
                'static/css/pm/article.css',
                'static/js/controllers/main/view_detail.js'
                // 'static/css/detail.css'
            ])
        })
        //观演记详情   兼容老板分享
        .state('main.viewdetail0', {
            url: '/viewdetail/id/:id',
            templateUrl: 'static/partials/main/view_detail.html',
            resolve: loadLazyjs([
                // 'static/js/controllers/main/revice.js',
                'static/js/controllers/public/public.js',
                // 'static/js/controllers/main/detail.js',
                'static/css/public.css',
                'static/css/pm/article.css',
                'static/js/controllers/main/view_detail.js'
                // 'static/css/detail.css'
            ])
        })
        // .state('main.ticket', {
        //     url: '/detail/ticket/:good_id',
        //     templateUrl: 'static/partials/main/ticket.html',
        //     resolve: loadLazyjs([
        //         'static/js/controllers/main/ticket.js',
        //         'static/css/public.css',
        //         'static/css/ticket.css'
        //     ])
        // })
        .state('main.pay', {
            url: '/pay/:order_id?_',
            templateUrl: 'static/partials/main/pay.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/pay.js',
                'static/css/public.css',
                'static/css/ticket.css'
            ])
        })
        //选座支付
        .state('main.xuanpay', {
            url: '/xuanpay/:order_id?_',
            templateUrl: 'static/partials/main/xuan_pay.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/xuan_pay.js',
                'static/css/public.css',
                'static/css/ticket.css'
            ])
        })
        //选座
        .state('main.seat', {
            url: '/seat/:event_id/:good_id',
            templateUrl: 'static/partials/main/seat.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/seat.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/detail.css',
                'static/css/seat.css'
            ])
        })

        .state('main.pay_address', {
            url: '/pay/address/:order_id/:src/',
            templateUrl: 'static/partials/main/pay_address.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/pay_address.js',
                'static/css/public.css',
                'static/css/my.css'
            ])
        })
        .state('main.pay_coupon', {
            url: '/pay/coupon/:order_id/:good_id/:total',
            templateUrl: 'static/partials/main/pay_coupon.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/pay_coupon.js',
                'static/css/public.css',
                'static/css/my.css'
            ])
        })
        .state('main.login', {
            url: '/login/:good_id',
            templateUrl: 'static/partials/main/login.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/login.js',
                'static/css/public.css',
                'static/css/login.css',
                'static/css/my.css'
            ])
        })
        //兑吧活动登录
        .state('main.duilogin', {
            url: '/duilogin/:good_id',
            templateUrl: 'static/partials/main/duilogin.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/duilogin.js',
                'static/css/public.css',
                'static/css/login.css',
                'static/css/my.css'
            ])
        })
        //兑吧注册
        .state('main.user_duiregister', {
            url: '/user/duiregister/:good_id',
            templateUrl: 'static/partials/main/user_duiregister.html',
            resolve: loadLazyjs([
                'https://pv.sohu.com/cityjson?ie=utf-8',
                'static/js/controllers/main/user_duiregister.js',
                'static/css/public.css',
                'static/css/my.css',
            ])
        })
        .state('main.user_myduiregister', {
            url: '/user/myduiregister/:mobile/:good_id',
            templateUrl: 'static/partials/main/user_myduiregister.html',
            resolve: loadLazyjs([ 'https://pv.sohu.com/cityjson?ie=utf-8',
                'static/js/controllers/main/user_myduiregister.js',
                'static/css/public.css',
                'static/css/my.css',
            ])
        })
        //新注册绑定
        .state('main.user_register', {
            url: '/user/register/:good_id/:cordeId',
            templateUrl: 'static/partials/main/user_register.html',
            resolve: loadLazyjs([
                'https://pv.sohu.com/cityjson?ie=utf-8',
                'static/js/controllers/main/user_register.js',
                'static/css/public.css',
                'static/css/my.css',
            ])
        })
        .state('main.user_myregister', {
            url: '/user/myregister/:mobile/:good_id',
            templateUrl: 'static/partials/main/user_myregister.html',
            resolve: loadLazyjs([ 'https://pv.sohu.com/cityjson?ie=utf-8',
                'static/js/controllers/main/user_myregister.js',
                'static/css/public.css',
                'static/css/my.css',
            ])
        })
        //发送验证码
        .state('main.use_sendCode', {
            url: '/user/sendCode/:mobile/:good_id',
            templateUrl: 'static/partials/main/use_sendCode.html',
            resolve: loadLazyjs([  'https://pv.sohu.com/cityjson?ie=utf-8',
                'static/js/controllers/main/user_sendCode.js',
                'static/css/public.css',
                'static/css/my.css',
                'static/css/registerCode/use_sendCode.css',
            ])
        })
        //老的注册
        .state('main.reset_password_1', {
            url: '/reset/password/1',
            templateUrl: 'static/partials/main/reset_password_1.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/reset_password_1.js',
                'static/css/public.css',
                'static/css/my.css'
            ])
        })
        .state('main.reset_password_2', {
            url: '/reset/password/2',
            templateUrl: 'static/partials/main/reset_password_2.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/reset_password_2.js',
                'static/css/public.css',
                'static/css/my.css'
            ])
        })
        //新绑定手机号
        .state('main.register', {
            url: '/register/:good_id',
            templateUrl: 'static/partials/main/rebind.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/rebind.js',
                'static/css/public.css',
                'static/css/my.css'
            ])
        })
        .state('main.rebindCode', {
            url: '/rebindCode/:good_id/:mobile',
            templateUrl: 'static/partials/main/rebindCode.html',
            resolve: loadLazyjs(['https://pv.sohu.com/cityjson?ie=utf-8',
                'static/js/controllers/main/rebindCode.js',
                'static/css/public.css',
                'static/css/my.css',
                'static/css/registerCode/use_sendCode.css'
            ])
        })
        .state('main.rebindmyCode', {
            url: '/rebindmyCode/:good_id/:mobile',
            templateUrl: 'static/partials/main/rebindmyCode.html',
            resolve: loadLazyjs(['https://pv.sohu.com/cityjson?ie=utf-8',
                'static/js/controllers/main/rebindmyCode.js',
                'static/css/public.css',
                'static/css/my.css'
            ])
        })
        //兑吧绑定
        .state('main.registerDui', {
            url: '/registerDui/:good_id',
            templateUrl: 'static/partials/main/rebind_dui.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/rebind_dui.js',
                'static/css/public.css',
                'static/css/my.css'
            ])
        })
        .state('main.rebindmyCodeDui', {
            url: '/rebindmyCodeDui/:good_id/:mobile',
            templateUrl: 'static/partials/main/rebindmyCode_dui.html',
            resolve: loadLazyjs(['https://pv.sohu.com/cityjson?ie=utf-8',
                'static/js/controllers/main/rebindmyCode_dui.js',
                'static/css/public.css',
                'static/css/my.css'
            ])
        })
        .state('main.treasure', {
            url: '/treasure/:kind',
            templateUrl: 'static/partials/main/treasure.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/treasure.js',
                'static/css/public.css',
                'static/css/treasure.css'
            ])
        })
        .state('main.award', {
            url: '/award/:award_id',
            templateUrl: 'static/partials/main/award.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/award.js',
                'static/css/public.css',
                'static/css/treasure.css'
            ])
        })
        .state('main.unveiled', {
            url: '/unveiled',
            templateUrl: 'static/partials/main/unveiled.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/unveiled.js',
                'static/css/public.css',
                'static/css/treasure.css'
            ])
        })
        .state('main.partake', {
            url: '/partake/:award_id',
            templateUrl: 'static/partials/main/partake.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/partake.js',
                'static/css/public.css',
                'static/css/treasure.css'
            ])
        })
        .state('main.recharge', {
            url: '/recharge',
            templateUrl: 'static/partials/main/recharge.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/recharge.js',
                'static/css/public.css',
                'static/css/treasure.css'
            ])
        })
        .state('main.paying', {
            url: '/paying',
            templateUrl: 'static/partials/main/paying.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/paying.js',
                'static/css/public.css',
                'static/css/treasure.css'
            ])
        })
        .state('main.payresult', {
            url: '/payresult',
            templateUrl: 'static/partials/main/payresult.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/payresult.js',
                'static/css/public.css',
                'static/css/treasure.css'
            ])
        })
        .state('main.activity', {
            url: '/activity/:id',
            templateUrl: 'static/partials/main/activity.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/activity.js',
                'static/css/public.css',
                'static/css/my.css'
            ])
        })
        .state('main.countdetail', {
            url: '/countdetail',
            templateUrl: 'static/partials/main/countdetail.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/countdetail.js',
                'static/css/public.css',
                'static/css/treasure.css'
            ])
        })
        .state('main.privilege', {
            url: '/privilege',
            templateUrl: 'static/partials/main/privilege.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/privilege.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
            ])
        })
        .state('main.allcomments',{
            url: '/allcomments/good/:good_id',
            templateUrl: 'static/partials/main/allcomments.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/allcomments.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/detail.css'
            ])
        })
        .state('main.allreply',{
            url: '/allreply/good/:comment_id',
            templateUrl: 'static/partials/main/allreply.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/allreply.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/detail.css'
            ])
        })
        //充值
        .state('main.rechargewallet', {
            url: '/rechargewallet/:app/:accessToken',
            templateUrl: 'static/partials/main/rechargeWallet.html',
            resolve: loadLazyjs([
                 'static/js/controllers/main/rechargeWallet.js',
                'static/css/public.css',
                'static/css/my.css',
                'static/css/my/myWallet.css'
            ])
        })

        //观演记*评论
        .state('main.viewallcomments',{
            url: '/viewallcomments/good/:good_id',
            templateUrl: 'static/partials/main/view_allcomments.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/view_allcomments.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/detail.css'
            ])
        })
        //观演记*回复
        .state('main.viewallreply',{
            url: '/viewallreply/good/:comment_id/:commentType',
            templateUrl: 'static/partials/main/view_allreply.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/view_allreply.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/detail.css'
            ])
        })
        //独家攻略*评论
        .state('main.raidersallcomments',{
            url: '/raidersallcomments/good/:good_id',
            templateUrl: 'static/partials/main/raidersallcomments.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/raidersallcomments.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/detail.css'
            ])
        })
        //独家攻略*回复
        .state('main.raidersallreply',{
            url: '/raidersallreply/good/:comment_id',
            templateUrl: 'static/partials/main/raidersallreplay.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/raidersallreplay.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/detail.css'
            ])
        })
        //他人粉丝列表
        .state('main.othersfans', {
            url: '/othersfans/:authorid',
            templateUrl: 'static/partials/main/others_fans.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/others_fans.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/my/myFansList.css'
            ])
        })
        //他人关注列表
        .state('main.othersfollow', {
            url: '/othersfollow/:authorid',
            templateUrl: 'static/partials/main/others_follow.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/others_follow.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/my/myFansList.css'
            ])
        })
        .state('main.write_reviews', {
            url: '/write_reviews/good/:good_id',
            templateUrl: 'static/partials/main/write_reviews.html',
            resolve: loadLazyjs([
                'static/js/controllers/main/write_reviews.js',
                'static/css/public.css',
                'static/css/detail.css'
            ])
        })
        // *******************************************  大家好,我是分割线  *******************************************
        .state('my', {
            url: '/my',
            template: '<div ui-view ></div>'
        })
        .state('my.index', {
            url: '/index',
            templateUrl: 'static/partials/my/index.html',
            resolve: loadLazyjs([
                'static/js/controllers/public/sign.js',
                'static/js/controllers/my/index.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/my.css',
                'static/css/myindex.css'
            ])
        })
        .state('my.duishop', {
            url: '/duishop',
            templateUrl: 'static/partials/my/duiShop.html',
            resolve: loadLazyjs([
                'static/js/controllers/public/public.js',
                'static/js/controllers/my/duishop.js',
                'static/css/public.css',
                'static/css/pm/CategoryList.css',
                'static/css/pm/view.css',
                'static/css/selectla.css',
                'static/css/price/price_comparisonlist.css',
                'static/css/venus/venus.css',
            ])
        })
        .state('my.logistics_information', {
            url: '/logistics/information/:order_id',
            templateUrl: 'static/partials/my/logistics_information.html',
            resolve: loadLazyjs([
                'static/js/controllers/my/logistics_information.js',
                'static/css/public.css',
                'static/css/my.css',
            ])
        })
        .state('my.orders', {
            url: '/orders/:status',
            templateUrl: 'static/partials/my/orders.html',
            resolve: loadLazyjs([
                'static/js/controllers/my/orders.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/my.css'
            ])
        })
        //写观演记
        .state('my.editview', {
            url: '/editview',
            templateUrl: 'static/partials/my/editview.html',
            resolve: loadLazyjs([
                'static/js/controllers/my/editview.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/my/view.css'
            ])
        })
        // 我的观演记-草稿箱
        .state('my.viewcaolist', {
            url: '/viewcaolist',
            templateUrl: 'static/partials/my/view_caoList.html',
            resolve: loadLazyjs([
                'static/js/controllers/public/public.js',
                'static/js/controllers/my/view_caolist.js',
                'static/css/public.css',
                'static/css/my/view.css',


            ])
        })
        .state('my.order', {
            url: '/order/:id',
            templateUrl: 'static/partials/my/order.html',
            resolve: loadLazyjs([
                'static/js/controllers/my/order.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/my.css'
            ])
        })
        //衍生品订单列表
        .state('my.productorders', {
            url: '/productorders/:status/:order_status/:payment_status/:shipping_status',
            templateUrl: 'static/partials/my/product_orders.html',
            resolve: loadLazyjs([
                'static/js/controllers/my/product_orders.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/my.css'
            ])
        })
        .state('my.coupon', {
            url: '/coupon/:status',
            templateUrl: 'static/partials/my/coupon.html',
            resolve: loadLazyjs([
                'static/js/controllers/my/coupon.js',
                'static/css/public.css',
                'static/css/my.css'
            ])
        })
        .state('my.address_management', {
            url: '/address/management',
            templateUrl: 'static/partials/my/address_management.html',
            resolve: loadLazyjs([
                'static/js/controllers/my/address_management.js',
                'static/css/public.css',
                'static/css/my.css'
            ])
        })
        // 衍生品退款页面
        .state('my.product_refund', {
            url: '/product_refund/:id',
            templateUrl: 'static/partials/my/product_refund.html',
            resolve: loadLazyjs([
                'static/js/controllers/my/product_refund.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/product/product_refund.css',
            ])
        })
        // 衍生品订单
        .state('my.product_order', {
            url: '/product_order/:id',
            templateUrl: 'static/partials/my/product_order.html',
            resolve: loadLazyjs([
                'static/js/controllers/my/product_order.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/product/product_order.css',
            ])
        })
        .state('my.reset_password', {
            url: '/reset_password',
            templateUrl: 'static/partials/my/reset_password.html',
            resolve: loadLazyjs([
                'static/js/controllers/my/reset_password.js',
                'static/css/public.css',
                'static/css/my.css'
            ])
        })
        .state('my.edit_address', {
            url: '/edit/address/:id',
            templateUrl: 'static/partials/my/edit_address.html',
            resolve: loadLazyjs([
                'static/js/controllers/my/edit_address.js',
                'static/css/public.css',
                'static/css/my.css'
            ])
        })
        //消息列表
        .state('my.Message', {
            url: '/Message/:kind',
            templateUrl: 'static/partials/my/newMessage.html',
            resolve: loadLazyjs([
                'static/js/controllers/my/newMessage.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/my.css',
                'static/css/pm/message.css',

            ])
        })
        .state('my.message_system_detail', {
            url: '/message_system_detail',
            templateUrl: 'static/partials/my/message_system_detail.html',
            resolve: loadLazyjs([
                'static/js/controllers/my/message_system_detail.js',
                'static/css/public.css',
                'static/css/my.css'
            ])
        })
        .state('my.settings_index', {
            url: '/settings',
            templateUrl: 'static/partials/my/settings.html',
            resolve: loadLazyjs([
                'static/js/controllers/my/settings.js',
                'static/css/public.css',
                'static/css/my.css'
            ])
        })
        .state('my.settings_feedback', {
            url: '/settings/feedback',
            templateUrl: 'static/partials/my/settings_feedback.html',
            resolve: loadLazyjs([
                'static/js/controllers/my/settings_feedback.js',
                'static/css/public.css',
                'static/css/my.css'
            ])
        })
        .state('my.about_stars', {
            url: '/about_stars',
            templateUrl: 'static/partials/my/about_stars.html',
            resolve: loadLazyjs([
                'static/css/public.css',
                'static/css/my.css'
            ])
        })
        .state('my.settings_problems', {
            url: '/settings/problems',
            templateUrl: 'static/partials/my/settings_problems.html',
            resolve: loadLazyjs([
                'static/css/public.css',
                'static/css/my.css'
            ])
        })
        .state('my.account_settings', {
            url: '/account_settings',
            templateUrl: 'static/partials/my/account_settings.html',
            resolve: loadLazyjs([
                'static/js/controllers/my/account_settings.js',
                'static/css/public.css',
                'static/css/my.css'
            ])
        })
        .state('my.set_nickname', {
            url: '/set_nickname',
            templateUrl: 'static/partials/my/set_nickname.html',
            resolve: loadLazyjs([
                'static/js/controllers/my/set_nickname.js',
                'static/css/public.css',
                'static/css/my.css'
            ])
        })
        .state('my.precious', {
            url: '/precious/:kind',
            templateUrl: 'static/partials/my/precious.html',
            resolve: loadLazyjs([
                'static/js/controllers/my/precious.js',
                'static/css/public.css',
                'static/css/my.css'
            ])
        })
        .state('my.member', {
            url: '/member',
            templateUrl: 'static/partials/my/member.html',
            resolve: loadLazyjs([
                'static/js/controllers/my/member.js',
                'static/css/public.css',
                'static/css/my.css'
            ])
        })
        .state('my.share', {
            url: '/share',
            templateUrl: 'static/partials/my/share.html',
            resolve: loadLazyjs([
                'static/js/controllers/my/share.js',
                'static/css/public.css',
                'static/css/my.css'
            ])
        })
        //我的钱包
        .state('my.wallet', {
            url: '/wallet',
            templateUrl: 'static/partials/my/myWallet.html',
            resolve: loadLazyjs([
                'static/js/controllers/my/myWallet.js',
                'static/css/public.css',
                'static/css/my.css',
                'static/css/my/myWallet.css'
            ])
        })

        //独角币兑换
        .state('my.currencyexchange', {
            url: '/currencyexchange',
            templateUrl: 'static/partials/my/currency_exchange.html',
            resolve: loadLazyjs([
                'static/js/controllers/my/currency_exchange.js',
                'static/css/public.css',
                'static/css/my.css',
                'static/css/my/myWallet.css'
            ])
        })
        //独角币兑换成功
        .state('my.exchangePaySuccess', {
            url: '/exchangePaySuccess/:showIn/:getBar',
            templateUrl: 'static/partials/my/currency_exchangePaySuccess.html',
            resolve: loadLazyjs([
                'static/js/controllers/my/currency_exchangePaySuccess.js',
                'static/css/public.css',
                'static/css/my.css',
                'static/css/my/myWallet.css'
            ])
        })
        //独角币充值成功
        .state('my.rechargePaySuccess', {
            url: '/rechargePaySuccess',
            templateUrl: 'static/partials/my/recharge_paySuccess.html',
            resolve: loadLazyjs([
                 'static/js/controllers/my/recharge_paySuccess.js',
                'static/css/public.css',
                'static/css/my.css',
                'static/css/my/myWallet.css'
            ])
        })
        .state('my.collect', {
            url: '/collect/:kind',
            templateUrl: 'static/partials/my/collect.html',
            resolve: loadLazyjs([
                'static/js/controllers/my/collect.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/pm/Collect.css',
                'static/css/my.css'
            ])
        })
        .state('my.comment', {
            url: '/comment/:kind',
            templateUrl: 'static/partials/my/comment.html',
            resolve: loadLazyjs([
                'static/js/controllers/my/comment.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/my.css',
                'static/css/comment/comment.css'
            ])
        })
        //粉丝列表
        .state('my.myFansList', {
            url: '/myFansList',
            templateUrl: 'static/partials/my/myFansList.html',
            resolve: loadLazyjs([
                'static/js/controllers/my/myFansList.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/my/myFansList.css'
            ])
        })
        //足迹
        .state('my.myFootprites', {
            url: '/myFootprites',
            templateUrl: 'static/partials/my/footprites.html',
            resolve: loadLazyjs([
                'static/js/controllers/my/footprites.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/my/myFansList.css'
            ])
        })
        //我的应援
        .state('my.myAidRecords', {
            url: '/myAidRecords',
            templateUrl: 'static/partials/my/myAidRecords.html',
            resolve: loadLazyjs([
                'static/js/controllers/my/myAidRecords.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/my/myFansList.css'
            ])
        })
        .state('my.myFollowList', {
            url: '/myFollowList',
            templateUrl: 'static/partials/my/myFollowList.html',
            resolve: loadLazyjs([
                'static/js/controllers/my/myFollowList.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/my/myFansList.css'
            ])
        })
        .state('my.comment_detail', {
            url: '/comment/detail/:comment_id',
            templateUrl: 'static/partials/my/comment_detail.html',
            resolve: loadLazyjs([
                'static/js/controllers/my/comment_detail.js',
                'static/js/controllers/public/public.js',
                'static/css/public.css',
                'static/css/my.css'
            ])
        })
}])
    .run(['$rootScope', '$state', 'localStorageService', function ($rootScope, $state, localStorageService, $locationProvider) {
        $rootScope.$on('$stateChangeStart', function (evt, toState, toParams, fromState, fromParams) {
                window.scrollTo(0,0);
                $rootScope.currentDate = new Date() //底部菜单时间
                var stateName = toState.name;
                //拦截以下路由,身份验证
                if (stateName == 'main.ticket' || stateName == 'main.pay' || stateName.indexOf('my') == 0) {
                    if (!localStorageService.get('token')) {
                        evt.preventDefault();

                        var rs = "";
                        if (stateName == 'main.ticket') {
                            rs = "main.detail-" + JSON.stringify({good_id: toParams.good_id});
                        }else if(stateName.indexOf('my') == 0){
                            rs = "main.index-"+JSON.stringify({});
                        }
                        var ua = window.navigator.userAgent.toLowerCase();
                        if (ua.match(/MicroMessenger/i) == 'micromessenger'){//判断是否是微信浏览器
                            location.href = "https://open.weixin.qq.com/connect/oauth2/authorize?" +
                                "appid=wxda73ac8ac7af1261&" +
                                "redirect_uri=http%3A%2F%2Ftest.djx.m.opentickets.cn%2Foauth%2Findex" +
                                "&response_type=code&scope=snsapi_userinfo&state=" + encodeURIComponent(rs);
                        } else {
                            location.href = "#/main/login/"+encodeURIComponent(rs);
                        }
                    }
                }

            },
            $rootScope.$on("$stateChangeSuccess",  function(event, toState, toParams, fromState, fromParams) {
                $rootScope.previousState_name = fromState.name;
                $rootScope.previousState_params = fromParams;
                if(toState.name=='main.viewwangeditor'&&fromState.name!="main.sendView"){
                    $rootScope.backname=fromState.name;
                    $rootScope.backname_params = fromParams;
                }
            }),
            $rootScope.back = function() {//实现返回的函数
                if($rootScope.previousState_name){
                    $state.go($rootScope.previousState_name,$rootScope.previousState_params,{reload:true});
                }else{
                    $state.go('main.index');

                }
            }
        );
    }])